package com.website.custom.service.impl;

import java.util.List;
import com.website.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.website.custom.mapper.WDevelopMapper;
import com.website.custom.domain.WDevelop;
import com.website.custom.service.IWDevelopService;
import com.website.common.core.text.Convert;

/**
 * 发展历程Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class WDevelopServiceImpl implements IWDevelopService 
{
    @Autowired
    private WDevelopMapper wDevelopMapper;

    /**
     * 查询发展历程
     * 
     * @param id 发展历程主键
     * @return 发展历程
     */
    @Override
    public WDevelop selectWDevelopById(Long id)
    {
        return wDevelopMapper.selectWDevelopById(id);
    }

    /**
     * 查询发展历程列表
     * 
     * @param wDevelop 发展历程
     * @return 发展历程
     */
    @Override
    public List<WDevelop> selectWDevelopList(WDevelop wDevelop)
    {
        return wDevelopMapper.selectWDevelopList(wDevelop);
    }

    /**
     * 新增发展历程
     * 
     * @param wDevelop 发展历程
     * @return 结果
     */
    @Override
    public int insertWDevelop(WDevelop wDevelop)
    {
        wDevelop.setCreateTime(DateUtils.getNowDate());
        return wDevelopMapper.insertWDevelop(wDevelop);
    }

    /**
     * 修改发展历程
     * 
     * @param wDevelop 发展历程
     * @return 结果
     */
    @Override
    public int updateWDevelop(WDevelop wDevelop)
    {
        wDevelop.setUpdateTime(DateUtils.getNowDate());
        return wDevelopMapper.updateWDevelop(wDevelop);
    }

    /**
     * 批量删除发展历程
     * 
     * @param ids 需要删除的发展历程主键
     * @return 结果
     */
    @Override
    public int deleteWDevelopByIds(String ids)
    {
        return wDevelopMapper.deleteWDevelopByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除发展历程信息
     * 
     * @param id 发展历程主键
     * @return 结果
     */
    @Override
    public int deleteWDevelopById(Long id)
    {
        return wDevelopMapper.deleteWDevelopById(id);
    }
}
